<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditManagerTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditManagerLabel_managerId}" for="managerId" />
                    <h:inputText id="managerId" value="#{managerController.selected.managerId}" title="#{bundle.EditManagerTitle_managerId}" required="true" requiredMessage="#{bundle.EditManagerRequiredMessage_managerId}"/>
                    <h:outputLabel value="#{bundle.EditManagerLabel_username}" for="username" />
                    <h:inputText id="username" value="#{managerController.selected.username}" title="#{bundle.EditManagerTitle_username}" required="true" requiredMessage="#{bundle.EditManagerRequiredMessage_username}"/>
                    <h:outputLabel value="#{bundle.EditManagerLabel_password}" for="password" />
                    <h:inputText id="password" value="#{managerController.selected.password}" title="#{bundle.EditManagerTitle_password}" required="true" requiredMessage="#{bundle.EditManagerRequiredMessage_password}"/>
                    <h:outputLabel value="#{bundle.EditManagerLabel_name}" for="name" />
                    <h:inputText id="name" value="#{managerController.selected.name}" title="#{bundle.EditManagerTitle_name}" required="true" requiredMessage="#{bundle.EditManagerRequiredMessage_name}"/>
                    <h:outputLabel value="#{bundle.EditManagerLabel_gender}" for="gender" />
                    <h:inputText id="gender" value="#{managerController.selected.gender}" title="#{bundle.EditManagerTitle_gender}" />
                    <h:outputLabel value="#{bundle.EditManagerLabel_birthday}" for="birthday" />
                    <h:inputText id="birthday" value="#{managerController.selected.birthday}" title="#{bundle.EditManagerTitle_birthday}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditManagerLabel_address}" for="address" />
                    <h:inputText id="address" value="#{managerController.selected.address}" title="#{bundle.EditManagerTitle_address}" />
                    <h:outputLabel value="#{bundle.EditManagerLabel_phone}" for="phone" />
                    <h:inputText id="phone" value="#{managerController.selected.phone}" title="#{bundle.EditManagerTitle_phone}" />
                    <h:outputLabel value="#{bundle.EditManagerLabel_email}" for="email" />
                    <h:inputText id="email" value="#{managerController.selected.email}" title="#{bundle.EditManagerTitle_email}" required="true" requiredMessage="#{bundle.EditManagerRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.EditManagerLabel_isAdministrator}" for="isAdministrator" />
                    <h:inputText id="isAdministrator" value="#{managerController.selected.isAdministrator}" title="#{bundle.EditManagerTitle_isAdministrator}" required="true" requiredMessage="#{bundle.EditManagerRequiredMessage_isAdministrator}"/>
                    <h:outputLabel value="#{bundle.EditManagerLabel_isActive}" for="isActive" />
                    <h:inputText id="isActive" value="#{managerController.selected.isActive}" title="#{bundle.EditManagerTitle_isActive}" required="true" requiredMessage="#{bundle.EditManagerRequiredMessage_isActive}"/>
                </h:panelGrid>
                <h:commandLink action="#{managerController.update}" value="#{bundle.EditManagerSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditManagerViewLink}"/>
                <br />
                <h:commandLink action="#{managerController.prepareList}" value="#{bundle.EditManagerShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditManagerIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
